<template>
  <div class="header-bar">
    <sider-trigger :collapsed="collapsed" @on-change="handleCollpasedChange"></sider-trigger>
    <custom-bread-crumb show-icon style="margin-left: 30px;" :list="breadCrumbList"></custom-bread-crumb>
    <div class="custom-content-con">
      <slot></slot>
    </div>
  </div>
</template>
<script>
import siderTrigger from './sider-trigger/sider-trigger'
import customBreadCrumb from './custom-bread-crumb/custom-bread-crumb'
export default {
  data () {
    return {
      breadCrumbList: [
        {
          name: '首页',
          to: '/home',
          icon: 'ios-home-outline'
        },
        {
          name: 'components',
          to: '/login',
          icon: 'logo-buffer'
        },
        {
          name: 'Breadcrumb',
          to: '/home',
          icon: 'ios-cafe'
        }
      ]
    }
  },
  props: {
    collapsed: Boolean
  },
  methods: {
    handleCollpasedChange (state) {
      this.$emit('on-coll-change', state)
    }
  },
  components: {
    siderTrigger,
    customBreadCrumb
  }
}
</script>
<style lang="stylus" scoped>
.header-bar
  width: 100%
  height: 100%
  position: relative
  .custom-content-con
    float: right
    height: auto
    padding-right: 20px
</style>
